package com.kdzy.lshy.socity_server.controller;

import com.kdzy.lshy.socity_server.service.ReservationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;


/**
 * 我的预约
 *  1.居民预约查询
 *  2.居民预约详情
 *  3.办事员不接受预约调整（增，改，查）
 *  4.办事员不接受预约时间记录删除（逻辑删除）
 *
 * @author sjj
 */

@RestController
@CrossOrigin("*")
@RequestMapping("/")
public class ReservationController {
    @Autowired
    private ReservationService mrService;


    //居民预约查询
    @RequestMapping(value = "/demandMyReservation", method = RequestMethod.POST)
    public Object demandMyReservation(String param, HttpServletRequest request) {

        return mrService.demandMyReservation(param,request);
    }

    //居民预约详情
    @RequestMapping(value = "/myReservationDetails", method = RequestMethod.POST)
    public Object myReservationDetails(String param, HttpServletRequest request) {

        return mrService.myReservationDetails(param,request);
    }

    //办事员不接受预约时间调整
    @RequestMapping(value = "/dpmtReservationAdjust", method = RequestMethod.POST)
    public Object dpmtReservationAdjust(String param, HttpServletRequest request) {

        return mrService.judge(param,request);
    }

    //办事员不接受预约时间记录删除
    @RequestMapping(value = "/dpmtReservationRemove", method = RequestMethod.POST)
    public Object dpmtReservationRemove(String param, HttpServletRequest request) {

        return mrService.dpmtReservationRemove(param,request);
    }
}